package com.xyy.saas.payment.payment.core.dto;

import com.xyy.saas.payment.cores.vo.FuminRecordBo;
import com.xyy.saas.payment.common.enums.FBankTradeTypeEnum;

/**
 * {
 *     "merchant_no":"8808001031946415",
 *     "amount":"263461.11",
 *     "trade_remark":"",
 *     "account_no":"3008001032806709000010",
 *     "trade_date":"2021-09-03 14:09:46",
 *     "biz_channel_orderid":"11618447544003928128",
 *     "account_handle_type":"39",
 *     "oth_account_name":"",
 *     "trade_no":"2109031618447544135573526",
 *     "trade_type":"40",
 *     "cust_merchant_no":"119c",
 *     "oth_bank_name":"",
 *     "oth_bank_code":"",
 *     "direction":"C",
 *     "oth_account_no":"3008001032806709000020"
 * }
 */
public class VirtualAccountDto {
    private String merchant_no;
    private String amount;
    private String account_no;
    private String trade_date;
    private String biz_channel_orderid;
    private String account_handle_type;
    private String oth_account_name;
    private String trade_no;
    private String trade_type;
    private String cust_merchant_no;
    private String oth_bank_name;
    private String oth_bank_code;
    private String direction;
    private String oth_account_no;

    public static VirtualAccountDto build(FuminRecordBo fuminRecordBo, String accountId) {
        VirtualAccountDto virtualAccountDto = new VirtualAccountDto();
        virtualAccountDto.setTrade_type(FBankTradeTypeEnum.SETTLE.getType());
        virtualAccountDto.setAccount_handle_type(FBankTradeTypeEnum.ACCOUNT_HANDLE_TYPE.getType());
        virtualAccountDto.setCust_merchant_no(accountId);
        virtualAccountDto.setTrade_date(fuminRecordBo.getTradeDate());
        /**
         * TODO 先写死
         * 8808001031946415 生产
         * 8808001003079104 测试
         */
        virtualAccountDto.setMerchant_no("8808001031946415");
        virtualAccountDto.setAccount_no(fuminRecordBo.getAccountNo());
        virtualAccountDto.setAmount(fuminRecordBo.getAmount());
        return virtualAccountDto;
    }

    public String getMerchant_no() {
        return merchant_no;
    }

    public void setMerchant_no(String merchant_no) {
        this.merchant_no = merchant_no;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getAccount_no() {
        return account_no;
    }

    public void setAccount_no(String account_no) {
        this.account_no = account_no;
    }

    public String getTrade_date() {
        return trade_date;
    }

    public void setTrade_date(String trade_date) {
        this.trade_date = trade_date;
    }

    public String getBiz_channel_orderid() {
        return biz_channel_orderid;
    }

    public void setBiz_channel_orderid(String biz_channel_orderid) {
        this.biz_channel_orderid = biz_channel_orderid;
    }

    public String getAccount_handle_type() {
        return account_handle_type;
    }

    public void setAccount_handle_type(String account_handle_type) {
        this.account_handle_type = account_handle_type;
    }

    public String getOth_account_name() {
        return oth_account_name;
    }

    public void setOth_account_name(String oth_account_name) {
        this.oth_account_name = oth_account_name;
    }

    public String getTrade_no() {
        return trade_no;
    }

    public void setTrade_no(String trade_no) {
        this.trade_no = trade_no;
    }

    public String getTrade_type() {
        return trade_type;
    }

    public void setTrade_type(String trade_type) {
        this.trade_type = trade_type;
    }

    public String getCust_merchant_no() {
        return cust_merchant_no;
    }

    public void setCust_merchant_no(String cust_merchant_no) {
        this.cust_merchant_no = cust_merchant_no;
    }

    public String getOth_bank_name() {
        return oth_bank_name;
    }

    public void setOth_bank_name(String oth_bank_name) {
        this.oth_bank_name = oth_bank_name;
    }

    public String getOth_bank_code() {
        return oth_bank_code;
    }

    public void setOth_bank_code(String oth_bank_code) {
        this.oth_bank_code = oth_bank_code;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    public String getOth_account_no() {
        return oth_account_no;
    }

    public void setOth_account_no(String oth_account_no) {
        this.oth_account_no = oth_account_no;
    }
}
